home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compendium Deluxe 2
/
LSD and 17bit Compendium Deluxe - Volume II.iso
/
a
/
prog
/
misc
/
frefs11.lha
/
FetchRefs
/
Source
/
GenerateIndex
/
triton_lib.c
< prev
Wrap
C/C++ Source or Header
|
1994-07-31
|
2KB
|
104 lines
/*
* Triton - The object oriented GUI creation system for the Amiga
* Written by Stefan Zeiger in 1993-1994
*
* (c) 1993-1994 by Stefan Zeiger
* You are hereby allowed to use this source or parts of it for
* creating programs for AmigaOS which use the Triton GUI creation
* system. All other rights reserved.
*
* Very slightly modified to compile with DICE. Anders Melchiorsen, 30-May-94
*/
#define TR_NOMACROS
#define TR_NOSUPPORT
#include <clib/exec_protos.h>
#include <libraries/triton.h>
#include <proto/triton.h>
/* Support functions */
struct Library *TritonBase;
struct TR_App *__Triton_Support_App;
/****** triton.lib/TR_OpenTriton ******
*
* NAME
* TR_OpenTriton -- Opens Triton ready to use.
*
* SYNOPSIS
* success = TR_OpenTriton(version, tag1,...)
* D0
*
* BOOL TR_OpenTriton(ULONG, ULONG,...);
*
* FUNCTION
* Opens triton.library with the specified minimum
* version and creates an application.
* The supplied tags are passed as a taglist to
* TR_CreateApp().
*
* RESULT
* success - Was everything opened successful?
*
* SEE ALSO
* TR_CloseTriton(), TR_CreateApp()
*
******/
BOOL TR_OpenTriton(ULONG version, ULONG taglist,...)
{
if(!(TritonBase=OpenLibrary(TRITONNAME,version))) return FALSE;
if(!(__Triton_Support_App=TR_CreateApp((struct TagItem *)&taglist))) return FALSE;
return TRUE;
}
/****** triton.lib/TR_CloseTriton ******
*
* NAME
* TR_CloseTriton -- Closes Triton easily.
*
* SYNOPSIS
* TR_CloseTriton()
*
* VOID TR_CloseTriton(VOID);
*
* FUNCTION
* Closes the application created by OpenTriton()
* and closes triton.library.
*
* SEE ALSO
* TR_OpenTriton()
*
******/
void
TR_CloseTriton(void)
{
if(__Triton_Support_App)
{
TR_DeleteApp(__Triton_Support_App);
__Triton_Support_App=NULL;
}
if(TritonBase)
{
CloseLibrary(TritonBase);
TritonBase=NULL;
}
}
/* Stack arguments stubs */
struct TR_Project * TR_OpenProjectTags(struct TR_App *app, ULONG taglist,...)
{ return TR_OpenProject(app, (struct TagItem *)&taglist); }
ULONG TR_EasyRequestTags(struct TR_App *app, STRPTR bodyfmt, STRPTR gadfmt, ULONG taglist,...)
{ return TR_EasyRequest(app, bodyfmt, gadfmt, (struct TagItem *)&taglist); }
ULONG TR_AutoRequestTags(struct TR_App *app, struct TR_Project *lockproject, ULONG taglist,...)
{ return TR_AutoRequest(app, lockproject, (struct TagItem *)&taglist); }